<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>vue基础练习2</title>
    <style>
        .one{
            width: 100px;
            height: 100px;
            background-color: aquamarine;
        }
        .active{
            width: 100px;
            height: 100px;
            background-color: pink;
        }
    </style>
</head>

<body>
    <div id="app">
        <div v-bind:class="className"></div>
        <div v-bind:class="{active:isActive}"></div>
        <div v-bind:class="['one',{active:isActive}]"></div>
        <div v-bind:style="styleObj"></div>
        <div v-bind:style="{color:'red'}">1</div>
        <div v-bind:style="[styleObj,{color:'blue'}]">2</div>
    </div>
    <script src="./vue.global.js"></script>
    <script>
        const { createApp } = Vue;
        const app = createApp({
            data() {
                return {
                    className:"one",
                    isActive:true,
                    styleObj:{
                        width:"100px",
                        height:"100px",
                        backgroundColor:"orange"
                    }
                }
            }
        });
        app.mount('#app');
    </script>
</body>

</html>